package view;
import java.awt.BorderLayout;

import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class CreateRoomView extends javax.swing.JPanel {
	private JLabel lblName;
	private JTextField txtName;
	private JTextField txtPrice2Pers;
	private JTextField txtMaxPers;
	private JLabel lblMaxPers;
	private JTextField txtPrice3Pers;
	private JTextField txtPrice1Pers1Child;
	private JTextField txtPrice1Pers2Children;
	private JTextField txtPrice2Pers1Child;
	private JButton btnSave;
	private JButton btnCancel;
	private JTextField txtPrice1Pers;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
		
	public CreateRoomView() {
		super();
		initGUI();
	}
	

	private void initGUI() {
		try {
			
			GridLayout thisLayout = new GridLayout(0, 2);
			thisLayout.setColumns(2);
			thisLayout.setHgap(5);
			thisLayout.setVgap(5);
			this.setLayout(thisLayout);
			this.setSize(new java.awt.Dimension(420, 300));
			{
				lblName = new JLabel();
				lblName.setHorizontalTextPosition(JLabel.CENTER);
				this.add(lblName);
				lblName.setText("Room Name");
			}
			{
				txtName = new JTextField();
			
				this.add(getTxtName());
			}
			{
				lblMaxPers = new JLabel();
				this.add(lblMaxPers);
				lblMaxPers.setText("Max. Persons");
			}
			{
				txtMaxPers = new JTextField();
				this.add(getTxtMaxPers());
				txtMaxPers.setText("1");
			}
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 1 Person");
			}
			{
				txtPrice1Pers = new JTextField();
				this.add(getTxtPrice1Pers());
			}
			
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 2 Persons");
			}
			{
				txtPrice2Pers = new JTextField();
				this.add(txtPrice2Pers);
			}
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 3 Persons");
			}
			{
				txtPrice3Pers = new JTextField();
				this.add(txtPrice3Pers);
			}
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 1 Person + 1 Child");
			}
			{
				txtPrice1Pers1Child = new JTextField();
				this.add(txtPrice1Pers1Child);
			}
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 1 Person + 2 Children");
			}
			{
				txtPrice1Pers2Children = new JTextField();
				this.add(txtPrice1Pers2Children);
			}
			{
				JLabel lblPrice1 = new JLabel();
				this.add(lblPrice1);
				lblPrice1.setText("Price for 2 Persons + 1 Child");
			}
			{
				txtPrice2Pers1Child = new JTextField();
				this.add(txtPrice2Pers1Child);
			}
			{
				btnSave = new JButton("Save");
				this.add(btnSave);
				btnCancel = new JButton("Cancel");
				this.add(btnCancel);
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public JTextField getTxtName() {
		return txtName;
	}
	
	public JTextField getTxtMaxPers() {
		return txtMaxPers;
	}
	
	public JTextField getTxtPrice2Pers() {
		return txtPrice2Pers;
	}

	public void addActionsListeners(ActionListener listener)
	{
		btnSave.addActionListener(listener);
		btnCancel.addActionListener(listener);		
	}

	public JButton getBtnSave()
	{
		return btnSave;
	}

	public JButton getBtnCancel()
	{
		return btnCancel;
	}


	public JTextField getTxtPrice3Pers()
	{
		return txtPrice3Pers;
	}


	public JTextField getTxtPrice1Pers1Child()
	{
		return txtPrice1Pers1Child;
	}


	public JTextField getTxtPrice1Pers2Children()
	{
		return txtPrice1Pers2Children;
	}


	public JTextField getTxtPrice2Pers1Child()
	{
		return txtPrice2Pers1Child;
	}


	public JTextField getTxtPrice1Pers()
	{
		return txtPrice1Pers;
	}

		

}
